
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
/*
#include <libxml/encoding.h>
#include <libxml/xmlwriter.h>
#include <libxml/parser.h>
#ifndef SOFTWARE_NAME
#define SOFTWARE_NAME "example"
#endif
#ifndef VERSION
#define VERSION "NO VERSION"
#endif
struct self_struct {
  char *dbName;
  char *origin;
  void *db;
  int httpPort;
};
void *self__init(int argc, const char *const *argv)
{
  struct self_struct *self = NULL;
  xmlDocPtr doc;
  xmlNodePtr root_node, now;
  xmlChar *xml_char = NULL;
  const char *filename;
  if ((argc == 3) && !strcmp(argv[1], "-c")) {
    filename = argv[2];
  } else {
    printf("Usage: %s [OPTION]... [FILE]...\n\
%s\n\
-c\tconfig file\n\
Examples:\n\
\t%s -c config.xml\n", SOFTWARE_NAME, SOFTWARE_NAME, SOFTWARE_NAME);
    exit(1);
  }
  if (access(filename, F_OK) == 0) {
    doc = xmlParseFile(filename);
    printf("[DEBUG]xml_driver__file:%s\n", filename);
  } else {
    printf("[----ERROR] no %s\n", filename);
   exit(1);
  }
  self = calloc(1, sizeof(*self));
  self->httpPort = 80;

  root_node = xmlDocGetRootElement(doc);
  now = xmlFirstElementChild(root_node);
  xml_char = xmlGetProp(now, BAD_CAST "httpPort");
  if (xml_char) {
    self->httpPort = atoi((char *)xml_char);
    xmlFree(xml_char);
  }
  xml_char = xmlGetProp(now, BAD_CAST "dbName");
  if (xml_char) {
    self->dbName = strdup((char *)xml_char);
    xmlFree(xml_char);
  }
  xml_char = xmlGetProp(now, BAD_CAST "origin");
  if (xml_char) {
    self->origin = strdup((char *)xml_char);
    xmlFree(xml_char);
  }
  return self;
}
*/
#include <stdlib.h>
int main(int argc, const char * const *argv)
{
 // struct self_struct *self = self__init(argc, argv);
  printf("self:%d\n", __LINE__);
  char *str = "3.5741302967071533";
  double f = atof(str);
  printf("%f\n", f);
  printf("%.17f\n", f);
  exit(1);
  while (1) {
    sleep(2);
    printf("CRC32\n");
    //fflush(stdout);
  }
  return 0;
}

